﻿using ModbusRTULib;
using Sunny.UI;
namespace NModbus4Demo
{
    public partial class Form1 : UIForm
    {
        public Form1()
        {
            InitializeComponent();
            ModbusRTU modbusRTU = new ModbusRTU();
            bool res = modbusRTU.Connect("COM2");
            if (!res)
            {
                return;
            }
            byte[] bytes = modbusRTU.ReadOutputCoils(1, 0, 10);
        }
    }
}
